<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .container{
            height: 100px;
            width: 200px;
            border: 2px solid red;
        }
        .box{
            width: 100px;
            height: 100px;
            float: left;
        }
        .box1{
            background-color: rgba(247, 186, 196, 0.7);
            /* margin-left 的负值 
             如果元素的margin-left时一个负值
             本身会往左移动，
             同时后面的元素也会左移
            */
            margin-left: -50px;
        }
        .box2{
            background-color: rgba(53, 53, 235, 0.7);
        }
    </style>
</head>
<body>
    <div class="container">
        <div class="box box1"></div>
        <div class="box box2"></div>
    </div>
</body>
</html>